package org.framework.app.model.dao.impl;

import org.apache.log4j.Logger;
import org.framework.app.model.dao.IDAO;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.jdbc.support.lob.DefaultLobHandler;


/**
 * Title: FAST framework<br>
 * Description: Base implement for DAO <br>
 * Date: 2012-3-22 <br>
 * Copyright (c) 2012 PGIASoft <br>
 * @author zdp
 * 
 * 同时支持基本的和命名参数的JdbcTemplate对数据库进行操作<br>
 * 实际使用中可根据情况选用<br>
 */
public class DAOImpl implements IDAO {
	private static Logger logger = Logger.getLogger(DAOImpl.class);
	protected static JdbcTemplate jdbcTemplate;
	protected static NamedParameterJdbcTemplate namedJdbcTemplate;
	protected static DefaultLobHandler defaultLobHandler;

	public NamedParameterJdbcTemplate getNamedJdbcTemplate() {
		return namedJdbcTemplate;
	}

	public void setNamedJdbcTemplate(
			NamedParameterJdbcTemplate namedJdbcTemplate) {
		DAOImpl.namedJdbcTemplate = namedJdbcTemplate;
	}

	public JdbcTemplate getJdbcTemplate() {
		return jdbcTemplate;
	}

	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		DAOImpl.jdbcTemplate = jdbcTemplate;
	}

	public DefaultLobHandler getDefaultLobHandler() {
		return defaultLobHandler;
	}

	public void setDefaultLobHandler(DefaultLobHandler defaultLobHandler) {
		DAOImpl.defaultLobHandler = defaultLobHandler;
	}

}
